<template>
  <div class="login-phone">
    <el-form
      label-width="70px"
      :model="account"
      :rules="loginPhoneRules"
      ref="elFormRef"
      class="el-form"
    >
      <el-form-item label="手机号" prop="phoneNumber">
        <el-input v-model="account.phoneNumber"></el-input>
      </el-form-item>
      <el-form-item label="验证码" prop="verifyCode">
        <div class="password-btn">
          <el-input v-model="account.verifyCode"></el-input>
          <el-button type="primary" class="el-btn">获取验证码</el-button>
        </div>
      </el-form-item>
    </el-form>
  </div>
</template>

<script lang="ts">
import { defineComponent, reactive } from 'vue'
import { loginPhoneRules } from '../config/account-config'

export default defineComponent({
  name: 'LoginPhone',
  setup() {
    const account = reactive({
      phoneNumber: '',
      verifyCode: ''
    })

    return { account, loginPhoneRules }
  }
})
</script>

<style lang="less" scoped>
.el-form {
  padding-top: 10px;
  .password-btn {
    display: flex;
    .el-btn {
      margin-left: 5px;
      padding-left: 5px;
      padding-right: 5px;
    }
  }
}
</style>
